using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class HelperMethodsDemo : NBear.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Write(string.Format("intParam = {0}<br />", GetIntParam("intParam", 0)));
        Response.Write(string.Format("strParam = {0}<br />", GetStringParam("strParam", string.Empty)));
        Response.Write(string.Format("dtParam = {0}<br />", GetDateTimeParam("dtParam", DateTime.MinValue)));

        Session["hello time"] = DateTime.Now;

        Response.Write(string.Format("Test StrongTyped&lt;T&gt;(), current time ticks = {0}<br />", StrongTyped<DateTime>(Session["hello time"]).Ticks));
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        TextBox2.Text = TextToHtml(TextBox1.Text);
    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        TextBox4.Text = ToJsSingleQuoteSafeString(TextBox3.Text);
    }
}
